#ifndef _IUICONTROL_H_
#define _IUICONTROL_H_

#include <crt_util.h>

interface IUIPaint : public IBase
{
	std_method_(int, Paint)(HDC hDC, const RECT* rcPaint) PURE;
	std_method_(int, PaintDrawImage)(HDC hDC) PURE;
	std_method(PaintBkColor)(HDC hDC) PURE;
	std_method(PaintBkImage)(HDC hDC) PURE;
	std_method(PaintStatusImage)(HDC hDC) PURE;
	std_method(PaintText)(HDC hDC) PURE;
	std_method(PaintBorder)(HDC hDC) PURE;
	std_method(DoPostPaint)(HDC hDC, const RECT* rcPaint) PURE;
};

// {FF36EC2D-F4E9-4B4B-9571-5C596D3B09A1}
_DEFINE_IID(IID_IUIPaint,
	0xff36ec2d, 0xf4e9, 0x4b4b, 0x95, 0x71, 0x5c, 0x59, 0x6d, 0x3b, 0x9, 0xa1);


interface IUIAttribute : public IBase
{
	std_method(AddAttribute)(LPSTRING key, LPSTRING value) PURE;
	std_method_(LPSTRING, GetAttribute)(LPSTRING key) PURE;
	std_method(RemoveAttribute)(LPSTRING key) PURE;
	std_method(RemoveAllAttribute)() PURE;
};

// {7EED6377-E4E3-4E32-8E44-FA550F6EAADA}
_DEFINE_IID(IID_IUIAttribute,
	0x7eed6377, 0xe4e3, 0x4e32, 0x8e, 0x44, 0xfa, 0x55, 0xf, 0x6e, 0xaa, 0xda);


interface IUIControl : public IBase
{
	std_method_(LPCSTR, GetClass)() PURE;
	std_method_(LPCSTR, GetName)() PURE;
	std_method(SetName)(LPCSTR name) PURE;
	std_method_(LPCSTR, GetText)() PURE;
	std_method(SetText)(LPCSTR name) PURE;
	std_method_(LPCSTR, GetFlag)() PURE;
	std_method_(HWND, GetNative)() PURE;
	std_method(SetClientPos)(RECT rc) PURE;
	std_method_(RECT, GetClientPos)() PURE;
	std_method_(UIType, GetControlAttribute)() PURE;
	std_method_(IUIControl*, FindControl)(LPSTRING key) PURE;
	std_method_(IUIControl*, FindIndexControl)(UINT index) PURE;
	std_method_(UINT, GetControlCount)() PURE;
	std_method_(int,IsVisible)() PURE;
	std_method(SetVisible)(int visible) PURE;
	std_method_(int, IsEnabled)() PURE;
	std_method(SetEnabled)(int visible) PURE;
	std_method_(int, IsFocused)() PURE;
	std_method(SetFocus)() PURE;
	std_method(Init)() PURE;
	std_method(Event)(const NotifyEvent* event) PURE;
	std_method_(int, GetWidth)() PURE;
	std_method_(int, GetHeight)() PURE;
	std_method_(int, GetX)() PURE;
	std_method_(int, GetY)() PURE;
	std_method_(SIZE, GetFixed)() PURE;
	std_method(SetFixed)(SIZE rc) PURE;
	std_method_(RECT, GetPos)() PURE;
	std_method(SetPos)(RECT rc) PURE;
	std_method_(RECT, GetRelativePos)() PURE;
	std_method(SetRelativePos)(RECT rc) PURE;
	std_method_(UINT, GetBorderStyle)() PURE;
	std_method(SetBorderStyle)(UINT nStyle) PURE;
	std_method_(RECT, GetPadding)() PURE;
	std_method(SetPadding)(RECT rc) PURE;
	std_method_(LPSTRING, GetBkImage)() PURE;
	std_method(SetBkImage)(LPSTRING name) PURE;
	std_method_(DWORD, GetBkColor)() PURE;
	std_method(SetBkColor)(DWORD dwBackColor) PURE;
	std_method_(LPSTRING, GetToolTip)() PURE;
	std_method(SetToolTip)(LPSTRING pstrText) PURE;
	std_method_(int, GetToolTipWidth)() PURE;
	std_method(SetToolTipWidth)(int nWidth) PURE;
	std_method_(DWORD, GetBorderColor)() PURE;
	std_method(SetBorderColor)(DWORD dwBorderColor) PURE;
	std_method_(DWORD, GetFocusBorderColor)() PURE;
	std_method(SetFocusBorderColor)(DWORD dwBorderColor) PURE;
	std_method_(SIZE, GetBorderRound)() PURE;
	std_method(SetBorderRound)(SIZE cxyRound) PURE;
	std_method_(SIZE, GetBorderSize)() PURE;
	std_method(SetBorderSize)(SIZE rc) PURE;
};

// {50B8554A-2D0F-4490-AE4E-83AE3E67DA0F}
_DEFINE_IID(IID_IUiControl,
	0x50b8554a, 0x2d0f, 0x4490, 0xae, 0x4e, 0x83, 0xae, 0x3e, 0x67, 0xda, 0xf);


#endif // !_IUIBASE_H_


